Drop gtk_window_activate_focus
authorMatthias Clasen <mclasen@redhat.com>
Sun, 28 Apr 2019 19:02:18 +0000 (19:02 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 28 Apr 2019 22:21:09 +0000 (22:21 +0000)
This api wasn't used anywhere in GTK. And since
we've dropped the variant for the default widget,
this one should go too. If it is needed, it should
become and action too.

docs/reference/gtk/gtk4-sections.txt
gtk/gtkwindow.c
gtk/gtkwindow.h

index 33f5984760b4430397edf325584707425b478db2..48a991be96674f16eef1306d68040410b901b20c 100644 (file)
@@ -4647,7 +4647,6 @@ gtk_window_set_resizable
 gtk_window_get_resizable
 gtk_window_add_accel_group
 gtk_window_remove_accel_group
-gtk_window_activate_focus
 gtk_window_activate_default
 gtk_window_set_modal
 gtk_window_set_default_size
index 67dd10dc6fc764ca5cade5e1b9123d3c528b07c5..b89d710db128d046d31972444c652b6396c53205 100644 (file)
@@ -429,7 +429,6 @@ static void gtk_window_move_focus         (GtkWidget         *widget,
                                            GtkDirectionType   dir);
 
 static void gtk_window_real_activate_default (GtkWindow         *window);
-static void gtk_window_real_activate_focus   (GtkWindow         *window);
 static void gtk_window_keys_changed          (GtkWindow         *window);
 static gboolean gtk_window_enable_debugging  (GtkWindow         *window,
                                               gboolean           toggle);
@@ -801,7 +800,6 @@ gtk_window_class_init (GtkWindowClass *klass)
   container_class->forall = gtk_window_forall;
 
   klass->activate_default = gtk_window_real_activate_default;
-  klass->activate_focus = gtk_window_real_activate_focus;
   klass->keys_changed = gtk_window_keys_changed;
   klass->enable_debugging = gtk_window_enable_debugging;
   klass->close_request = gtk_window_close_request;
@@ -2838,27 +2836,6 @@ gtk_window_set_position (GtkWindow         *window,
     }
 }
 
-/**
- * gtk_window_activate_focus:
- * @window: a #GtkWindow
- * 
- * Activates the current focused widget within the window.
- * 
- * Returns: %TRUE if a widget got activated.
- **/
-gboolean 
-gtk_window_activate_focus (GtkWindow *window)
-{
-  GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
-
-  g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE);
-
-  if (priv->focus_widget && gtk_widget_is_sensitive (priv->focus_widget))
-    return gtk_widget_activate (priv->focus_widget);
-
-  return FALSE;
-}
-
 /**
  * gtk_window_get_focus:
  * @window: a #GtkWindow
@@ -6237,12 +6214,6 @@ gtk_window_real_activate_default (GtkWindow *window)
   gtk_window_activate_default (window);
 }
 
-static void
-gtk_window_real_activate_focus (GtkWindow *window)
-{
-  gtk_window_activate_focus (window);
-}
-
 static void
 do_focus_change (GtkWidget *widget,
                  gboolean   in)
index 3a06f4b42220b849c85db13ce9d658e4f65d769b..7f1f429c32e058d8e72c7c38bcedd28f0cb0e69b 100644 (file)
@@ -158,8 +158,6 @@ GDK_AVAILABLE_IN_ALL
 void       gtk_window_set_position             (GtkWindow           *window,
                                                GtkWindowPosition    position);
 GDK_AVAILABLE_IN_ALL
-gboolean   gtk_window_activate_focus          (GtkWindow           *window);
-GDK_AVAILABLE_IN_ALL
 void       gtk_window_set_focus                (GtkWindow           *window,
                                                GtkWidget           *focus);
 GDK_AVAILABLE_IN_ALL